home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / comm / tcp / HyperMail102.lha / HyperMail / libcgi / syn_mime.c < prev    next >
C/C++ Source or Header  |  1995-06-18  |  588b  |  30 lines

  1. /*
  2.  * This file is part of the LIBCGI library
  3.  *
  4.  * Copyright 1994 by Enterprise Integration Technologies Corporation
  5.  *
  6.  * This is freeware with commercialization rights reserved; see the
  7.  * LICENSE included in the distribution for specifics.
  8.  */
  9.  
  10. #include <stdio.h>
  11. #include "cgi.h"
  12.  
  13. int syn_mimeheader(buf, ct)
  14.      char *buf;
  15.      char *ct;
  16. {
  17.   int x;
  18.  
  19.   if (buf && ct) {
  20.     x = (int) sprintf(buf, "Content-Type: %s\n\n", ct);
  21.     return (x && x != EOF);
  22.   } else return 0;
  23. }
  24.  
  25. int print_mimeheader(ct)
  26.      char *ct;
  27. {
  28.   return (ct && (printf("Content-Type: %s\n\n", ct) != EOF));
  29. }
  30.